<template>
  <el-card>
    <div class="box">
      <div class="head">
        <h3>{{ resultParam.title }}</h3>
      </div>
      <div class="content">
        <p>{{ resultParam.content }}</p>
      </div>
      <div class="foot">
        <p>{{ resultParam.time }}</p>
      </div>
    </div>
  </el-card>
</template>
<script>
import { queryNoticeById } from "@/api/home";
export default {
  data() {
    return {
      resultParam: {},
    };
  },
  created() {
    this.paramId = this.$route.query.param;
    this.getNoticeById();
  },
  methods: {
    getNoticeById() {
      queryNoticeById({ id: this.paramId }).then((res) => {
        this.resultParam = res.data.data[0];
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.el-card {
  width: 100%;
  height: 670px;
  .box {
    width: 100%;
    height: auto;
    margin: 0 auto;
    .head {
      height: 80px;
      padding: 20px;
    }
    .content {
      height: 470px;
      padding: 20px;
      p {
        text-indent: 2ch;
      }
    }
    .foot {
      display: flex;
      flex-direction: row-reverse;
      padding-right: 50px;
      height: 50px;
    }
  }
}
</style>
